﻿using System;
namespace ControlSystem
{
    /**
     *
     * @author Johnathan Pretorius
     */

    public class FT
    {
        public double Vrtot;
        public int Vtype;
        public int FTSequence;

        public double Fx;
        public double Fy;
        public double Fz;
        public double Tx;
        public double Ty;
        public double Tz;
        public double time;

        public FT()
        {
            Fx = 0; Fy = 0; Fz = 0;
            Tx = 0; Ty = 0; Tz = 0;
            time = -1;
        }

        // FT readings from blue robot are all incorrectly negative
        public void CorrectFT2()
        {
            //this.Fx = -this.Fx;
            this.Fy = -this.Fy;
            this.Fz = -this.Fz;
            // this.Tx = -this.Tx;
            this.Ty = -this.Ty;
            this.Tz = -this.Tz;
        }

        // simplify FT data by rounding to 3 decimal places
        public void RoundFT()
        {
            this.Fx = Math.Round(this.Fx, 3);
            this.Fy = Math.Round(this.Fy, 3);
            this.Fz = Math.Round(this.Fz, 3);
            this.Tx = Math.Round(this.Tx, 3);
            this.Ty = Math.Round(this.Ty, 3);
            this.Tz = Math.Round(this.Tz, 3);
        }
    }
}